package com.dayuan.service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.dayuan.bean.Order;
import com.dayuan.dao.OrderSelectMapper;

@Service
public class OrderSelectService {
	
	@Resource(name="orderSelectMapper")
	private OrderSelectMapper orderMapper;

	/* 根据用户id或者订单状态查询订单详情表 */
	public List<Order> selectOrderByState(Integer userId) {
		Map<String, Object> params  = new HashMap<>();
		/*if(state!=1){
			params.put("state", state);
		}*/
		params.put("userId", userId);
		
		return orderMapper.selectOrderByState(params);
		
	}

	
}
